﻿//待办事宜
function Ajax_Todo_Query(data, Handler_Success) {
    var xmlhttp = createxmlhttp();
    xmlhttp.onreadystatechange = requestdata;
    xmlhttp.open("POST", URL_Todo, true);
    xmlhttp.setRequestHeader("If-Modified-Since", "0");
    xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    xmlhttp.send(data);
    function requestdata() {
        if (xmlhttp.readyState == 4) {
            if (xmlhttp.status == 200) {
                Handler_Success(xmlhttp.responseText);
            }
        }
    }
}
function Index_Todo() {
    var dataType = "CustomerService";
    var data = "dataType=" + dataType;
    Ajax_Todo_Query(data, Index_Todo_Success);
}
function Index_Todo_Success(_responseText) {
    if (_responseText == "EmptyData") {
        Hide_notification();
    } else {
        $("notification").style.display = "block";
        $("notificationContent").innerHTML = "<span>服务管理有新消息（" + _responseText + "）</span>";
    }
}
//隐藏 待办事宜 notification
function Hide_notification() {
    $("notification").style.display = "none";
}
